<?php
session_start();
if (!isset($_SESSION[userid])) {
    header("location:login.php");
}
?>

<html>
<head>
    <title>Plaintech UK: Cloud Operations Center</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="css/layout.css" />
    <link rel="stylesheet" type="text/css" href="css/login-success.css" />
    <script type="text/javascript">
	
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
    </script>
</head>
    <body onLoad="MM_preloadImages('images/check-status-button2.png','images/add-new-user2.png','images/home2.png','images/delete-user2.png')">
    <div id="menu" class="outer-west">
      <ul id="navigation">
    </ul>


<div id="header" class="ui-layout-north">
    <div id="logo">
        <img src="images/plaintech-small.png"/>
    </div>
    <div id="login-info">
        Welcome <span id="user"></span>&nbsp;|&nbsp;<a href="logout.php" id="logout" methode="GET">Sign Out</a>
</div>
    </div>
</div>

    <table width="100%" height="610" border="0" cellpadding="0" cellspacing="1"
 bgcolor="353735" id="shell">



<td width="90" valign="top" bgcolor="#636663">
<table id="login" title="Navigation">
<tr width="100%" height="0">
    <td width="177" height="0" valign="top"><a href="login_success.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','images/home2.png',1)"><img src="images/home.png" alt="home" name="home" width="181" height="37" border="0"></a><a href="statusreport.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Status check','','images/check-status-button2.png',1)"><img src="images/check-status-button.png" alt="Check Status" name="Status check" width="181" height="37" border="0"></a><a href="register.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Add user','','images/add-new-user2.png',1)"><img src="images/add-new-user.png" alt="Add new users" name="Add user" width="181" height="37" border="0"></a><a href="delete_user.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('delete user','','images/delete-user2.png',1)"><img src="images/delete-user.png" alt="Delete User" name="delete user" width="181" height="37" border="0"></a><a href="VM_Management.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('VM Management','','images/VM Management2.png',0)"><img src="images/VM Management.png" alt="VM Management" name="VM Management" width="181" height="37" border="0"></a></tr>
 </table>
</td><td bgcolor="#FAFAFA"><table height="0" id="content" title="Content">
  <tr><td>

        <p>
          <?php
        if ($_SESSION[groupid] == '0') {
            echo "<left><img src=\"images/Plaintech-employee-portal.png\"/></left><br /><br /> Welcome to the Employee Portal<br />";
        } elseif ($_SESSION[groupid] == '1') {
                echo "<left><img src=\"images/Plaintech-resellers-portal.png\"/></left><br /><br /> Welcome to the Resellers Portal<br />";
    }
        ?>
        </p>
        <img src="images/Activity Monitor.png" height="100" width="100"><br/>
          <a href="statusreport.php" >Check status reports</a> <br />
          <?php
        if ($_SESSION[groupid] == 0) {
            echo "Welcome, Administrator\"<br/>";
			echo "<img src=\"images/Add User.png\" height=\"100\" width=\"100\"/><br>";
            echo "<br /><a href=\"register.php\"></br>Add users here </a>";
        } else {
            echo "No admin";
        }
        echo "<br /><form action=\"logout.php\" method=\"GET\">
		<br> <br>
<div>
<input type=\"submit\" value=\"Logout\">
</div>
</form>";
        ?>
     </td></tr>
</table></table><div id="footer" class="ui-layout-south">
    Copyright 2011 &copy; Plaintech UK (<a href="http://www.Plaintech.com" target="_blank">www.Plaintech.com </a>). All Rights Reserved.
</div>

        

</body>
</html>